package configure

import (
	"gopkg.in/yaml.v2"
	"io/ioutil"
)

func InitYamlConf(conf interface{}, confPath string) {
	yamlByte, err := ioutil.ReadFile(confPath)
	if err != nil {
		panic(err)
	}
	err = yaml.Unmarshal(yamlByte, conf)
	if err != nil {
		panic(err)
	}
}
